<template>
  <div>
    <!-- <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" /> -->
    <!-- <html-panel :url="src" /> -->
    <!-- <vue-append v-append="html" @appended="appended"></vue-append> -->
     <div v-append="html" @appended="appended" /> 
    <!-- <div ref="htmlStr" v-html="html" /> -->
  </div>
</template>

<script>
import Vue from 'vue'
import VueAppend from 'vue-append'
Vue.use(VueAppend)
// import HtmlPanel from '@/components/HtmlPanel'
// import VueAppend from 'vue-append'
import axios from 'axios'

export default {
  data() {
    return {
      url: process.env.VUE_APP_BASE_API + '/druid/index.html',
      html: '',
      loading: false
      // height: document.documentElement.clientHeight - 94.5 + 'px;',
    }
  },
  mounted: function() {
    // console.log('druid')
    // const that = this
    // window.onresize = function temp() {
    //   that.height = document.documentElement.clientHeight - 94.5 + 'px;'
    // }
    let param = {
      accept: 'text/html, text/plain'
    }
    this.loading = true
    axios.get(this.url, param).then(res => {
      this.html = res.data
    }).catch(() => {
      this.html = '加载内容失败'
    }).finally(() => {
      this.loading = false
    })
  },
  methods: {
    appended() {}
  }
}

</script>

<style lang='stylus' scoped>

</style>
